/**
 * Created by houlei on 2024/10/17.
 * */
#include "Application.h"
#include "AppDelegate.h"
#include "logger.h"
#include <Python.h>
#include <mutex>
#include <iostream>

void init_python_env();

int main(int argc, char **argv) {
    static std::once_flag flag;
    std::call_once(flag, init_python_env);  // 确保单次初始化
    PyThreadState* main_state = PyEval_SaveThread();  // 释放GIL
    _LogLevel = LogLevel_INFO;
    return Application::shareInstance()->launch(new AppDelegate(), argc, argv);
}